
<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

    <title>FOFA API &#8212; FOFA 2.0.0 documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
    <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
    <script src="_static/doctools.js"></script>
    <script src="_static/sphinx_highlight.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="prev" title="Welcome to FOFA’s Python API documentation!" href="index.html" />
   
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <section id="module-fofa">
<span id="fofa-api"></span><h1>FOFA API<a class="headerlink" href="#module-fofa" title="Permalink to this heading">¶</a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="fofa.Client">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">fofa.</span></span><span class="sig-name descname"><span class="pre">Client</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">base_url</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">proxies</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fofa/client.html#Client"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fofa.Client" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>A class representing the FOFA client.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<em>str</em>) – The Fofa api key. If not specified, it will be read from the FOFA_KEY environment variable.</p></li>
<li><p><strong>base_url</strong> (<em>str</em>) – The base URL of the FOFA API. Defaults to ‘<a class="reference external" href="https://fofa.info">https://fofa.info</a>’.</p></li>
<li><p><strong>proxies</strong> (<em>dict</em>) – A proxies array for the requests library, e.g. {‘https’: ‘your proxy’}</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="fofa.Client.can_use_next">
<span class="sig-name descname"><span class="pre">can_use_next</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/fofa/client.html#Client.can_use_next"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fofa.Client.can_use_next" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if the “search_next” API can be used.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>True if the “search_next” API can be used, False otherwise.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>bool</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="fofa.Client.get_userinfo">
<span class="sig-name descname"><span class="pre">get_userinfo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/fofa/client.html#Client.get_userinfo"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fofa.Client.get_userinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Get user info for current user.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>User information in JSON format.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>dict</p>
</dd>
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>FofaException</strong> – If an error occurs during the API request.</p>
</dd>
<dt class="field-even">Example<span class="colon">:</span></dt>
<dd class="field-even"><p></p></dd>
</dl>
<p>The returned JSON result will be in the following format:</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w">    </span><span class="nt">&quot;username&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;sample&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;fofacli_ver&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;4.0.3&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;fcoin&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;error&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;fofa_server&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;avatar&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;https://nosec.org/missing.jpg&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;vip_level&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;is_verified&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;isvip&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;email&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;username@sample.net&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="fofa.Client.search">
<span class="sig-name descname"><span class="pre">search</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query_str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">page</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fields</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opts</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fofa/client.html#Client.search"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fofa.Client.search" title="Permalink to this definition">¶</a></dt>
<dd><p>Search data in FOFA.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>query_str</strong> (<em>str</em>) – <p>The search query string.</p>
<dl class="simple">
<dt>Example 1:</dt><dd><p>’ip=127.0.0.1’</p>
</dd>
<dt>Example 2:</dt><dd><p>’header=”thinkphp” || header=”think_template”’</p>
</dd>
</dl>
</p></li>
<li><p><strong>page</strong> (<em>int</em>) – Page number. Default is 1.</p></li>
<li><p><strong>size</strong> (<em>int</em>) – Number of results to be returned in one page. Default is 100.</p></li>
<li><p><strong>fields</strong> (<em>str</em>) – Comma-separated list of fields to be included in the query result.
Example:
‘ip,city’</p></li>
<li><p><strong>opts</strong> (<em>dict</em>) – Additional options for the query. This should be a dictionary of key-value pairs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Query result in JSON format.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w">    </span><span class="nt">&quot;results&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w">        </span><span class="p">[</span>
<span class="w">            </span><span class="s2">&quot;111.**.241.**:8111&quot;</span><span class="p">,</span>
<span class="w">            </span><span class="s2">&quot;111.**.241.**&quot;</span><span class="p">,</span>
<span class="w">            </span><span class="s2">&quot;8111&quot;</span>
<span class="w">        </span><span class="p">],</span>
<span class="w">        </span><span class="p">[</span>
<span class="w">            </span><span class="s2">&quot;210.**.181.**&quot;</span><span class="p">,</span>
<span class="w">            </span><span class="s2">&quot;210.**.181.**&quot;</span><span class="p">,</span>
<span class="w">            </span><span class="s2">&quot;80&quot;</span>
<span class="w">        </span><span class="p">]</span>
<span class="w">    </span><span class="p">],</span>
<span class="w">    </span><span class="nt">&quot;mode&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;extended&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;error&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;query&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;app=\&quot;网宿科技-公司产品\&quot;&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;page&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;size&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span>
<span class="p">}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="fofa.Client.search_host">
<span class="sig-name descname"><span class="pre">search_host</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">host</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">detail</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opts</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fofa/client.html#Client.search_host"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fofa.Client.search_host" title="Permalink to this definition">¶</a></dt>
<dd><p>Search for host information based on the specified IP address or domain.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>host</strong> (<em>str</em>) – The IP address or domain of the host to search for.</p></li>
<li><p><strong>detail</strong> (<em>bool</em>) – Optional. Specifies whether to show detailed information. Default is False.</p></li>
<li><p><strong>opts</strong> (<em>dict</em>) – Optional. Additional options for the search. Default is an empty dictionary.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The query result in JSON format.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w">     </span><span class="nt">&quot;error&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w">     </span><span class="nt">&quot;host&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;78.48.50.249&quot;</span><span class="p">,</span>
<span class="w">     </span><span class="nt">&quot;ip&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;78.48.50.249&quot;</span><span class="p">,</span>
<span class="w">     </span><span class="nt">&quot;asn&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">6805</span><span class="p">,</span>
<span class="w">     </span><span class="nt">&quot;org&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Telefonica Germany&quot;</span><span class="p">,</span>
<span class="w">     </span><span class="nt">&quot;country_name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Germany&quot;</span><span class="p">,</span>
<span class="w">     </span><span class="nt">&quot;country_code&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;DE&quot;</span><span class="p">,</span>
<span class="w">     </span><span class="nt">&quot;protocol&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w">         </span><span class="s2">&quot;http&quot;</span><span class="p">,</span>
<span class="w">         </span><span class="s2">&quot;https&quot;</span>
<span class="w">     </span><span class="p">],</span>
<span class="w">     </span><span class="nt">&quot;port&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w">         </span><span class="mi">80</span><span class="p">,</span>
<span class="w">         </span><span class="mi">443</span>
<span class="w">     </span><span class="p">],</span>
<span class="w">     </span><span class="nt">&quot;category&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w">         </span><span class="s2">&quot;CMS&quot;</span>
<span class="w">     </span><span class="p">],</span>
<span class="w">     </span><span class="nt">&quot;product&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w">         </span><span class="s2">&quot;Synology-WebStation&quot;</span>
<span class="w">     </span><span class="p">],</span>
<span class="w">     </span><span class="nt">&quot;update_time&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;2022-06-11 08:00:00&quot;</span>
<span class="w"> </span><span class="p">}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="fofa.Client.search_next">
<span class="sig-name descname"><span class="pre">search_next</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query_str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fields</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">next</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">full</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opts</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fofa/client.html#Client.search_next"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fofa.Client.search_next" title="Permalink to this definition">¶</a></dt>
<dd><p>Query the next page of search results.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>query_str</strong> – <p>The search query string.</p>
<dl class="simple">
<dt>Example 1:</dt><dd><p>’ip=127.0.0.1’</p>
</dd>
<dt>Example 2:</dt><dd><p>’header=”thinkphp” || header=”think_template”’</p>
</dd>
</dl>
</p></li>
<li><p><strong>fields</strong> (<em>str</em>) – The fields to be included in the response.
Default: ‘host,ip,port’</p></li>
<li><p><strong>size</strong> (<em>int</em>) – The number of results to be returned per page.
Default: 100
Maximum: 10,000</p></li>
<li><p><strong>next</strong> (<em>str</em>) – The ID for pagination.
The next value is returned in the response of previous search query.
If not provided, the first page of results will be returned.</p></li>
<li><p><strong>full</strong> (<em>bool</em>) – Specify if all data should be searched.
Default: False (search within the past year)
Set to True to search all data.</p></li>
<li><p><strong>opts</strong> (<em>dict</em>) – Additional options for the search.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The query result in JSON format.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="fofa.Client.search_stats">
<span class="sig-name descname"><span class="pre">search_stats</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query_str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fields</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">opts</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fofa/client.html#Client.search_stats"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fofa.Client.search_stats" title="Permalink to this definition">¶</a></dt>
<dd><p>Query the statistics of the search results.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>query_str</strong> (<em>str</em>) – <p>The search query string.</p>
<dl class="simple">
<dt>Example 1:</dt><dd><p>’ip=127.0.0.1’</p>
</dd>
<dt>Example 2:</dt><dd><p>’header=”thinkphp” || header=”think_template”’</p>
</dd>
</dl>
</p></li>
<li><p><strong>size</strong> (<em>int</em>) – The number of results to be aggregated for each item.
Default: 5</p></li>
<li><p><strong>fields</strong> (<em>str</em>) – The fields to be included in the aggregation.
Example: ‘ip,city’</p></li>
<li><p><strong>opts</strong> (<em>dict</em>) – Additional options for the search.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>query result in json format</p>
</dd>
</dl>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w">    </span><span class="nt">&quot;distinct&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w">        </span><span class="nt">&quot;ip&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1717</span><span class="p">,</span>
<span class="w">        </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">411</span>
<span class="w">    </span><span class="p">},</span>
<span class="w">    </span><span class="nt">&quot;lastupdatetime&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;2022-06-17 13:00:00&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;aggs&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w">        </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w">            </span><span class="p">{</span>
<span class="w">                </span><span class="nt">&quot;count&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">35</span><span class="p">,</span>
<span class="w">                </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;百度一下，你就知道&quot;</span>
<span class="w">            </span><span class="p">},</span>
<span class="w">            </span><span class="p">{</span>
<span class="w">                </span><span class="nt">&quot;count&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">25</span><span class="p">,</span>
<span class="w">                </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;百度网盘-免费云盘丨文件共享软件丨超大容量丨存储安全&quot;</span>
<span class="w">            </span><span class="p">},</span>
<span class="w">            </span><span class="p">{</span>
<span class="w">                </span><span class="nt">&quot;count&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">16</span><span class="p">,</span>
<span class="w">                </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;百度智能云-登录&quot;</span>
<span class="w">            </span><span class="p">},</span>
<span class="w">            </span><span class="p">{</span>
<span class="w">                </span><span class="nt">&quot;count&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span>
<span class="w">                </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;百度翻译开放平台&quot;</span>
<span class="w">            </span><span class="p">}</span>
<span class="w">        </span><span class="p">],</span>
<span class="w">        </span><span class="nt">&quot;countries&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span>
<span class="w">    </span><span class="p">},</span>
<span class="w">    </span><span class="nt">&quot;error&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span>
<span class="p">}</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="fofa.FofaError">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">fofa.</span></span><span class="sig-name descname"><span class="pre">FofaError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/fofa/exception.html#FofaError"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fofa.FofaError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>This exception gets raised whenever an error returned by the Fofa API.</p>
</dd></dl>

</section>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">FOFA</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">FOFA API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#fofa.Client"><code class="docutils literal notranslate"><span class="pre">Client</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#fofa.FofaError"><code class="docutils literal notranslate"><span class="pre">FofaError</span></code></a></li>
</ul>
</li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="index.html">Documentation overview</a><ul>
      <li>Previous: <a href="index.html" title="previous chapter">Welcome to FOFA’s Python API documentation!</a></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2023 Fofa, Inc.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 6.2.1</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
      
      |
      <a href="_sources/fofa.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>